Skip to content

DEV-7091 – TaxCloud: shipping, address, and cache fixes#20

Merged
azane-code merged 2 commits intomasterfrom
DEV-7091-shipping-address-fix
Mar 11, 2026
Merged

DEV-7091 – TaxCloud: shipping, address, and cache fixes#20
azane-code merged 2 commits intomasterfrom
DEV-7091-shipping-address-fix

Conversation

@azane-code
Copy link
Copy Markdown
Contributor

Summary

Fixes three issues reported by Polydigitech: TaxCloud not capturing shipping cost, full address missing in captured transactions (wrong county/tax), and test lookups not matching captured orders due to cache key timing.

Changes

1. Shipping fallback when $0 (Model/Api.php)

  • In lookupTaxes(), when the shipping tax-detail row total is 0 (e.g. cart before shipping method is selected), use $address->getShippingAmount() so TaxCloud receives the actual shipping amount.

2. Preserve street after address verification (Observer/Sales/Address.php)

  • When verify_address is enabled and TaxCloud’s verifyAddress() returns empty Address1, keep the original Address1/Address2 so the street isn’t dropped and county/tax stay correct (e.g. Fulton vs Gwinnett for 30097).

3. Cache key from post-observer params (Model/Api.php)

  • Dispatch taxcloud_lookup_before before computing the cache key so the key is based on the same params sent to TaxCloud (including any observer changes). Avoids serving stale cache for a different address.

@azane-code azane-code requested a review from GusOhnesorge March 11, 2026 16:52
@azane-code azane-code merged commit 5395cdc into master Mar 11, 2026
7 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants